
import 'package:trade/common/config/i_config.dart';
import 'package:trade/common/network/base/base_http.dart';
import 'net_config/net_config.dart';

final TDConfig config = TDConfig();
class TDConfig extends IConfig{
  factory TDConfig() => _getInstance();
  static TDConfig get instance => _getInstance();
  static TDConfig? _instance;
  TDConfig._internal();
  static TDConfig _getInstance() {
    if (null == _instance) {
      _instance = TDConfig._internal();
    }
    return _instance!;
  }


  @override
  Future<void>? init() async {
    await net.init();
    await BaseHttp.instance.init();
  }

  final net = NetConfig();
}